<div id="ssBevel">
<table id="ssTable" cellpadding="0" cellspacing="0">
    <thead>
        <!-- control menu -->
	    <tr>
	       <td id="ssMenu" colspan="2">   
		       <table cellpadding="0" cellspacing="0"><tr><td width="100%">
		       {* if this is the site root then *}
	           {* blend out the home and the up *}
	           {* one level buttons             *}
	           {if $node.parent_id}
	               <a href="javascript: loadSiteTree();">
    	               <img src="{$INA.adminTemplate}images/home.gif" alt="Home" height="24" width="24" border="0" align="absmiddle" />
    	           </a>
    	           
    	           <a href="javascript: loadSiteTree({$node.parent_id});">
    	               <img src="{$INA.adminTemplate}images/up.gif" alt="Up One Level" height="24" width="24" border="0" align="absmiddle" />
    	           </a>
    	       {else}
    	           <img src="{$INA.adminTemplate}images/home_gr.gif" alt="Home" height="24" width="24" border="0" align="absmiddle" />
    	           <img src="{$INA.adminTemplate}images/up_gr.gif" alt="Up One Level" height="24" width="24" border="0" align="absmiddle" />
	           {/if}
	           
	           {* refresh the site tree button *}
	           <a href="javascript: loadSiteTree({$node.id});">
	               <img src="{$INA.adminTemplate}images/refresh.gif" alt="Refresh" height="24" width="24" border="0" align="absmiddle" />
	           </a>

	           <img src="{$INA.adminTemplate}images/ssmenusep.gif" width="3" height="38" border="0" align="absmiddle" />
	           
	           <select name="folderType" id="folderType" class="dropdown">
                   {html_options options=$folderTypes selected=$smarty.cookies.folderType}
               </select> 
               <a href="" onClick="return addFolderAlt({$node.id});">
                   <img src="{$INA.adminTemplate}images/new_folder.gif" alt="Add Folder" height="24" width="24" border="0" align="absmiddle" />
               </a>
               
               <img src="{$INA.adminTemplate}images/ssmenusep.gif" width="3" height="38" border="0" align="absmiddle" />
               
               <select name="pageType" id="pageType" class="dropdown">
                   {html_options options=$pageTypes selected=$smarty.cookies.pageType}
               </select>
	           <a href="" onClick="return addPageAlt({$node.id});">
	           <img src="{$INA.adminTemplate}images/new_page.gif" alt="Add Page" height="24" width="24" border="0" align="absmiddle" />
	           </a>
			   </td>

			   <td><div class="loading" id="loadingIC1" style="display: none;">&nbsp;</div></td>
			   <tr></table>
	       </td>
	    </tr>
	    <!-- end control menu -->
    </thead>
    
    
    
	<tbody>
	   <!-- path to the node -->
        <tr>
            <td class="sitePath" colspan="2">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr><td style="padding-right: 6px;">Location:</td>
                    <td id="location">
                        {foreach from=$sitePath item=path name=sitePath}
                            {if $smarty.foreach.sitePath.last}
                                {$path.title}
                            {else}
                                <a href="javascript: loadSiteTree({$path.id});">{$path.title}</a> /
                            {/if}
                        {/foreach}
                    </td><td>&nbsp;</td></tr>
                </table>
            </td>
        </tr>
        <!-- end path to the node -->
	   <tr>
	       <td id="ssInfo" valign="top">
               <div id="nodeInfo">
                    
               </div>
	       </td>
	       <td valign="top">
	       
	           <table id="ssTableContent" cellpadding="3" cellspacing="0" width="100%" height="100%">
	                <!-- start column headers -->
                    <thead>
                        <tr>
                            {if $INA.enable_order_position}
                                <td width="15" class="colTitle">
                                    <div class="colTitleText" onclick="javascript: loadSiteTree({$node.id},'order_pos'); return false;">
                                        {if $smarty.cookies.sorttree == 'name' or !$smarty.cookies.sorttree}
                                            {if $smarty.cookies.sorttreedir == 'desc'}
                                                <a href="javascript: loadSiteTree({$node.id},'order_pos'); return false;"><span class="sortdesc">#</span></a>
                                            {else}
                                                <a href="javascript: loadSiteTree({$node.id},'order_pos'); return false;"><span class="sortasc">#</span></a>
                                            {/if}
                                        {else}
                                            <a href="javascript: loadSiteTree({$node.id},'order_pos'); return false;">#</a>
                                        {/if}
                                    </div>
                                </td>
                            {/if}
                            <td class="colTitle">
                                <div class="colTitleText" onclick="javascript: loadSiteTree({$node.id},'name'); return false;">
                                    {if $smarty.cookies.sorttree == 'name' or !$smarty.cookies.sorttree}
                                        {if $smarty.cookies.sorttreedir == 'desc'}
                                            <a href="javascript: loadSiteTree({$node.id},'name'); return false;"><span class="sortdesc">Name</span></a>
                                        {else}
                                            <a href="javascript: loadSiteTree({$node.id},'name'); return false;"><span class="sortasc">Name</span></a>
                                        {/if}
                                    {else}
                                        <a href="javascript: loadSiteTree({$node.id},'name'); return false;">Name</a>
                                    {/if}
                                </div>
                            </td>
                            
                            <td width="85" class="colTitle">
                                <div class="colTitleText" onclick="javascript: loadSiteTree({$node.id},'publish'); return false;">
                                    {if $smarty.cookies.sorttree == 'publish'}
                                        {if $smarty.cookies.sorttreedir == 'desc'}
                                            <a href="javascript: loadSiteTree({$node.id},'publish'); return false;"><span class="sortdesc">Published</span></a>
                                        {else}
                                            <a href="javascript: loadSiteTree({$node.id},'publish'); return false;"><span class="sortasc">Published</span></a>
                                        {/if}
                                    {else}
                                        <a href="javascript: loadSiteTree({$node.id},'publish'); return false;">Published</a>
                                    {/if}
                                </div>
                            </td>
                            
                            <td width="150" class="colTitle">
                                <div class="colTitleText" onclick="javascript: loadSiteTree({$node.id},'ptype'); return false;">
                                    {if $smarty.cookies.sorttree == 'ptype'}
                                        {if $smarty.cookies.sorttreedir == 'desc'}
                                            <a href="javascript: loadSiteTree({$node.id},'ptype'); return false;"><span class="sortdesc">Type</span></a>
                                        {else}
                                            <a href="javascript: loadSiteTree({$node.id},'ptype'); return false;"><span class="sortasc">Type</span></a>
                                        {/if}
                                    {else}
                                        <a href="javascript: loadSiteTree({$node.id},'ptype'); return false;">Type</a>
                                    {/if}
                                </div>
                            </td>
                            
                    		<td width="110" class="colTitle">
                    		    <div class="colTitleText" onclick="loadSiteTree({$node.id},'moddate'); return false;">
                        		    {if $smarty.cookies.sorttree == 'moddate'}
                        		        {if $smarty.cookies.sorttreedir == 'desc'}
                        		              <a href="javascript: loadSiteTree({$node.id},'moddate'); return false;"><span class="sortdesc">Modified</span></a>
                        		        {else}
                        		              <a href="javascript: loadSiteTree({$node.id},'moddate'); return false;"><span class="sortasc">Modified</span></a>
                        		        {/if}
                        		    {else}
                        		        <a href="javascript: loadSiteTree({$node.id},'moddate'); return false;">Modified</a>
                        		    {/if}
                    		    </div>
                    		</td>
                        </tr>
                    </thead>
                    <!-- end column headers -->
                    
                    <tbody>
                        <tr>
                            {if $INA.enable_order_position}
							    <td class="emptyRow"></td>
							{/if}
                    		<td class="emptyRow"></td>
                    		<td class="emptyRow"></td>
                    		<td class="emptyRow"></td>
                    		<td class="emptyRow"></td>
                    	</tr>
                    	
                    <!-- folder/file list -->
                    {* ----- displaying folders ------- *}
            		{foreach from=$siteTree item=row}
                		<tr id="node{$row.id}">
                		    {if $INA.enable_order_position}
                    		    <td align="right">
    								<input  onKeyPress="javascript: updateOrderPositionOnEnter('Node',{$row.id},event)" 
    								        class="orderPos textinput" 
    								        style="display:none; text-align:right;" 
    								        type="text" 
    								        name="order_pos" 
    								        value="{$row.order_pos}" 
    								        id="orderPosNodeEdit-{$row.id}" 
    								        size="2">

    								<span   ondblclick="showOrderPositionEdit('Node', '{$row.id}');" 
    								        class="nodeOrderText"
    								        id="orderPosNode-{$row.id}">
    								  {$row.order_pos}
                                  </span>
    							</td>
							{/if}
                			<td>
                			    <span class="folder">
                    				<span id="siteNode{$row.id}">
                    					<span ondblclick="loadSiteTree({$row.id});" onClick="showinfo({$row.id});" id="row{$row.id}" class="nodeText">{$row.title|sslash}</span>
                    				</span>	
                				</span>
                			</td>
                			
                			<td id="p_node{$row.id}">
                			    {if $row.wf == 1}
                        		    <div class="published" onClick="unPublishNode({$row.id})">
                        		      &nbsp;
                        		    </div>
                    		    {else}
                    		        <div class="unpublished" onClick="publishNode({$row.id})">
                        		      &nbsp;
                        		    </div>
                    		    {/if}
                		    </td>
                		    
                			<td>
                			 {$row.datatype|default:"n/a"}
                			</td>
                			<td>
                			 {$row.modified|date_format:'%d/%m/%Y %H:%M'|default:"n/a"}
                			</td>
                		</tr>
            		{/foreach}
            		{* -------------------------------- *}
            		
            		<tr id="FolderFilesSeperator">
                        {if $INA.enable_order_position}
						    <td class="emptyRow"></td>
						{/if}
                		<td class="emptyRow"></td>
                		<td class="emptyRow"></td>
                		<td class="emptyRow"></td>
                		<td class="emptyRow"></td>
                	</tr>
            		
            		
            		{* ----- displaying files --------- *}
            		{foreach from=$sitePages item=row}
                		<tr id="page{$row.id}">
                		    {if $INA.enable_order_position}
                    		    <td align="right">								
    								<input  onKeyPress="javascript: updateOrderPositionOnEnter('Site',{$row.id},event)"  
    								        class="orderPos textinput" 
    								        style="display:none;  text-align:right;" 
    								        type="text" 
    								        name="order_pos" 
    								        value="{$row.order_pos}" 
    								        id="orderPosSiteEdit-{$row.id}" 
    								        size="2">

    								<span   ondblclick="showOrderPositionEdit('Site', '{$row.id}');" 
    								        class="nodeOrderText"
    								        id="orderPosSite-{$row.id}">
    								  {$row.order_pos}
                                  </span>
								
    							</td>
    						{/if}
                			<td>
                			    <span class="page">
                    				<span id="sitePage{$row.id}">
                    					<span ondblclick="loadPageEdit({$row.id})" onClick="showPageInfo({$row.id});" id="pageRow{$row.id}" class="nodeText">{$row.title|sslash}</span>
                    				</span>	
                				</span>
                			</td>
                			
                			<td id="p_page{$row.id}">
                			    {if $row.wf == 1}
                			        <div class="published" onClick="unPublishPage({$row.id})">
                        		      &nbsp;
                        		    </div>
                			    {else}
                        		    <div class="unpublished" onClick="publishPage({$row.id})">
                        		      &nbsp;
                        		    </div>
                    		    {/if}
                		    </td>
                		    
                			<td>
                			 {$row.datatype|default:"n/a"}
                			</td>
                			<td>
                			 {$row.modified|date_format:'%d/%m/%Y %H:%M'|default:"n/a"}
                			</td>
                		</tr>
            		{/foreach}
            		{* -------------------------------- *}
            		
            		
            		{* ----- no files or folders? ----- *}
            		{if !$sitePages and !$siteTree}
                		<tr id="emptyFolder">
                		    {if $INA.enable_order_position}
    						    <td class="emptyRow">&nbsp;</td>
    						{/if}
                    		<td>
                    			<div align="center"><i>This is an Empty Folder</i></div>
                    		</td>
                    		<td>&nbsp;</td>
                    		<td>&nbsp;</td>
                    		<td>&nbsp;</td>
                    	</tr>
                	{/if}
                	{* -------------------------------- *}
            		<!-- end folder/file list -->
            	    </tbody>
	           </table>
	           
	       </td>
	   </tr>
	</tbody>
</table>
</div>